<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

// 1、http://127.0.0.2/wap/index/test2/mike   $是指完全匹配，需要配置config
// 2、http://127.0.0.2/wap/index/test3/669    2和3是等效的，不推荐3，容易混淆
// 3、http://127.0.0.2/wap/index/669          //  Route::get(':id', 'Index/test3')
// 4、http://127.0.0.2/wap/index/test4/669/90
Route::group('index', function() {
    Route::rule('/', 'index');
    Route::get('test/:username', 'test');
    Route::get('test2/:name$', 'test2');
    Route::get('test3/:id$', 'test3');
    // Route::get(':id', 'Index/test3');  // 困扰好久的问题
    Route::get('test4/:id/:user$', 'test4');
});

